//
//  BackgroundLayer.cpp
//  identist
//
//  Created by Ethan on 14-2-27.
//
//

#include "BackgroundLayer.h"
#include "StaticData.h"

bool BackgroundLayer::init()
{
    bool pRet = false;
    
    do {
        CC_BREAK_IF(!CCLayer::init());
        
        CCSize winSize = CCDirector::sharedDirector()->getWinSize();
        
        CCSprite* bg = CCSprite::create(STATIC_DATA_STRING("yy_bg"));
        bg->setPosition(ccp(winSize.width * 0.5, winSize.height * 0.5+10));
        this->addChild(bg);
        
        CCSprite* bg2 = CCSprite::create(STATIC_DATA_STRING("yy_bg2"));
        bg2->setPosition(ccp(winSize.width * 0.5,120));
        bg2->setZOrder(4);
        this->addChild(bg2);
        
        CCSprite* bg3 = CCSprite::create(STATIC_DATA_STRING("yy_bg3"));
        bg3->setPosition(ccp(winSize.width * 0.5, 140));
        bg3->setZOrder(5);
        this->addChild(bg3);
        
        CCSprite* hd1 = CCSprite::create("figureLayer/haidaoLayer/yy_394_542.png");
        hd1->setPosition(ccp(394,1280 - 542));
        hd1->setZOrder(2);
        this->addChild(hd1);
        
        CCSprite* hd2 = CCSprite::create("figureLayer/haidaoLayer/yy_412_846.png");
        hd2->setPosition(ccp(412,1280 - 846));
        hd2->setZOrder(3);
        this->addChild(hd2);
        
        CCSprite* hd3 = CCSprite::create("figureLayer/haidaoLayer/yy_393_522.png");
        hd3->setPosition(ccp(393,1280 - 522));
        hd3->setZOrder(3);
        this->addChild(hd3);
        
        pRet = true;
    } while (0);
    return pRet;    
}